package com.zhangxin.common.exception;

import com.zhangxin.common.constant.ApiConstant;

/**
 * 全局异常信息
 */
public class ParameterException extends RuntimeException {
    private int errorCode;

    public ParameterException() {
        super(ApiConstant.ERROR_MESSAGE);
        this.errorCode = ApiConstant.ERROR_CODE;
    }

    public ParameterException(int errorCode) {
        this.errorCode = errorCode;
    }

    public ParameterException(String message) {
        super(message);
        this.errorCode = ApiConstant.ERROR_CODE;
    }

    public ParameterException(int errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }
}
